package test;
import java.security.Security;
import java.util.Enumeration;

import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.cryptopro.ECGOST3410NamedCurves;
import org.bouncycastle.asn1.ua.DSTU4145NamedCurves;
import org.bouncycastle.jce.provider.BouncyCastleProvider;  
  
public class Check {  
    public static void main(String[] args) {  
    	Security.addProvider(new BouncyCastleProvider());
  //      System.out.println("-------列出加密服务提供者-----");  
//        Provider[] pro = Security.getProviders();  
//        for (Provider p : pro) {  
//            System.out.println("Provider:" + p.getName() + " - version:" + p.getVersion()+"-info:"+p.getInfo());  
//        }  
//        System.out.println("");  
//        System.out.println("-------列出系统支持的消息摘要算法：");  
//        for (String s : Security.getAlgorithms("MessageDigest")) {  
//            System.out.println(s);  
//        }  
    	
//        System.out.println("-------列出系统支持的生成公钥和私钥对的算法：");  
//        for (String s : Security.getAlgorithms("KeyPairGenerator")) {  
//            System.out.println(s);  
//        }  
//    	
//        System.out.println("------支持加密的Signature");
//        for (String s : Security.getAlgorithms("KeyAgreement")) {  
//            System.out.println(s);  
//        }
        System.out.println("------支持加密的Signature");
        for (String s : Security.getAlgorithms("KeyGenerator")) {  
            System.out.println(s);  
        }
//        Enumeration names = ECGOST3410NamedCurves.getNames();
//        while(names.hasMoreElements()){
//        	Object nextElement = names.nextElement();
//        	System.out.println(nextElement);
//        }
        
//    	ASN1ObjectIdentifier[] oiDs = DSTU4145NamedCurves.getOIDs();
//    	for(ASN1ObjectIdentifier a:oiDs){
//    		System.out.println(a.getId());
//    	}
    }  
}  